package com.download.web.controller;


import com.download.web.entity.model.HotTagsModel;
import com.download.web.entity.model.Page;
import com.download.web.service.IBusArticleLableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cmy
 * @since 2019-02-20
 */
@Controller
@RequestMapping("/download/arcitalLable")
public class BusArticleLableController {

    @Autowired
    private IBusArticleLableService articleLableService;

    @RequestMapping("/hotTagsModelPage")
    public ModelAndView hotTagsModelPage(@RequestParam(value = "pageIndex",defaultValue = "0") Integer pageIndex, @RequestParam(value = "pageSize",defaultValue = "40")Integer pageSize){

        Page<HotTagsModel> hotTagsModelPage=articleLableService.hotTagsModelPage(pageIndex,pageSize);
        ModelAndView mv=new ModelAndView("web/tags-page");
        mv.addObject("tags",hotTagsModelPage);
        return mv;

    }

}
